import java.util.Arrays;
import java.util.Scanner;

//题目：取一个整数a从右端开始的4～7位。
public class Test31 {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        System.out.println("请输入一个数组个数");
        int n = console.nextInt();
        System.out.println("请输入" + n + "个数");
        int[] arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = console.nextInt();
        }
        Arrays.sort(arr);
        for (int i = arr.length-1; i >= 0; i--) {
            System.out.print(arr[i] + " ");
        }
    }
}